<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>修改</title>
    <link th:href="@{/bootstrap/css/bootstrap.min.css}" rel="stylesheet">
</head>
<body>
<div class="container main">
    <form action="/orderUpdate" method="post">
        <div class="form-group" style="display: none">
            <label for="id" class="control-label">ID:</label>
            <input type="text" class="form-control" id="id" name="id" th:value="${order.id}" required="required">
        </div>
        <div class="form-group">
            <label for="name" class="control-label">姓名:</label>
            <input type="text" class="form-control" id="name" name="name" th:value="${order.name}" required="required"
                   oninvalid="setCustomValidity('请输入姓名！');" oninput="setCustomValidity('');">
        </div>
        <div class="form-group">
            <label for="recipient-phone" class="control-label">手机号:</label>
            <input type="text" class="form-control" id="recipient-phone" name="phone" th:value="${order.phone}" required="required"
                   pattern="((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\d{8}"
                   oninvalid="setCustomValidity('请输入正确的手机号！');" oninput="setCustomValidity('');">
        </div>

        <div class="form-group">
            <label for="cost" class="control-label">总价:</label>
            <input class="form-control" th:value="${order.cost}" id="cost" name="cost" required="required"
                   oninvalid="setCustomValidity('请输入总价！');" oninput="setCustomValidity('');">
        </div>
        <div class="form-group">
            <input class="btn btn-primary" type="submit" value="保存">
        </div>
    </form>

</div>

</body>
</html>